<%@ page contentType="text/html" language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib  uri="/struts-tags" prefix="s"%>
<h2 class="contentTitle">添加项目类别</h2>
<div class="pageContent">
    <form method="post"   action="systemsetting/MaterialCategory_materialCategoryUpdate?sss=1" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
    <input type="hidden" name="b_T_Ufp_MaterialCategory.uuid" value="${b_T_Ufp_MaterialCategory.uuid }" />
    <input type="hidden" name="categoryStatus" value="${categoryStatus}" />
        <div class="pageFormContent nowrap" layoutH="97" overflow="hidden">
        <dl>
                <dt>
                  类别名称：
                </dt>
                <dd>
                    <input type="text" id="categoryName" name="b_T_Ufp_MaterialCategory.categoryName"  value="${b_T_Ufp_MaterialCategory.categoryName}" size="26" class="required"/>
                </dd>
            </dl>
            <c:if test="${flag ==0 || flag==1}">
            <dl>
                <dt>
                  所属大类：
                </dt>
                <dd>
                  <s:select label="" headerKey="" headerValue="设为大类" listKey="uuid" list="list_b_T_Ufp_MaterialCategory" listValue="categoryName" name="b_T_Ufp_MaterialCategory.pid"  cssStyle="width:197px;" class="required"/>
                </dd>
            </dl>
            </c:if>
       </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit" id="submit1">
                               保存
                            </button>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" class="close">
                                取消
                            </button>
                        </div>
                    </div>
                </li>
                 <li>
	                    <div class="buttonActive">
	                        <div class="buttonContent">
	                            <button type="button" id="submit2">
	                            删除
	                            </button>
	                        </div>
	                    </div>
	                </li>
                </ul>
                </div>
                 </form>
        </div>
        <form method="post" id="from3" action="systemsetting/MaterialCategory_materialCategoryDelete?checkIds=${b_T_Ufp_MaterialCategory.uuid}&b_T_Ufp_MaterialCategory.categoryStatus=${categoryStatus}&flag=${categoryStatus}" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">     
         </form>
<script type="text/javascript">
$(document).ready(function() {
	$("#submit2").click(function() {
		$("#from3").submit();
	       // $("#sumbit1").submit();
	    });
	 });
 </script>         